package com.program.facesigninsystem.dao;

import com.program.facesigninsystem.entity.UserInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
/**
 * @author Mapler
 */
@Repository
public interface IUserInfoDao {
    /****
     * 登录
     * @param openid 微信openid
     * @return [UserInfo]
     */
    UserInfo loginUser(@Param("openid") String openid);

    /****
     * 为用户添加token
     * @param uid 用户id
     * @param token 令牌
     */
    void  updateToken(@Param("uid")String uid,@Param("token")String token);

    /****
     * 添加新用户
     * @param uid 用户id
     * @param openid 微信openid
     * @param token 令牌
     */
    void addUser(@Param("uid")String uid,@Param("openid")String openid,@Param("token")String token);


    /***
     * 注册人脸
     * @param uid 用户id
     * @param facefeature 脸部特征数据
     */
    void addFace(@Param("uid")String uid,@Param("facefeature")byte[] facefeature);

    /***
     * 查询人脸特征
     * @param uid 用户id
     * @return 返回查询出来的人脸特征
     */
    Object selectFaceFeature(@Param("uid")String uid);
}
